﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Siva.CBC.Barnacle.ashx
{
    /// <summary>
    /// zhuanHandler 的摘要说明
    /// </summary>
    public class zhuanHandler : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //1.接收参数
            string content = context.Request.Form["content"];

            string _aesKey = "2174400001993176";
            string _aesIV = "1976517632144264";

            string result = string.Empty;

            try
            {
                result = AesUtil.AesDecrypt(content, _aesKey, _aesIV);
            }
            catch (Exception err)
            {
                result = err.Message;
            }

            context.Response.Write(result);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }

    }
}